package org.idea.qiyu.framework.apm.agent.core.dubbo;

import java.util.Arrays;
import java.util.Map;

/**
 * Dubbo各个节点的统计信息
 *
 * @Author linhao
 * @Date created in 7:04 下午 2021/7/19
 */
public class DubboStatisticsObject {

    private String parentId;

    private String traceId;

    private String methodName;

    private Class<?>[] parameterTypes;

    private Object[] arguments;

    private Map<String, String> attachments;

    private long beginTime;

    private long endTime;

    /**
     * 耗时单位ms
     */
    private long count;

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getTraceId() {
        return traceId;
    }

    public void setTraceId(String traceId) {
        this.traceId = traceId;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public Class<?>[] getParameterTypes() {
        return parameterTypes;
    }

    public void setParameterTypes(Class<?>[] parameterTypes) {
        this.parameterTypes = parameterTypes;
    }

    public Object[] getArguments() {
        return arguments;
    }

    public void setArguments(Object[] arguments) {
        this.arguments = arguments;
    }

    public Map<String, String> getAttachments() {
        return attachments;
    }

    public void setAttachments(Map<String, String> attachments) {
        this.attachments = attachments;
    }

    public long getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(long beginTime) {
        this.beginTime = beginTime;
    }

    @Override
    public String toString() {
        return "DubboStatisticsObject{" +
                "parentId='" + parentId + '\'' +
                ", traceId='" + traceId + '\'' +
                ", methodName='" + methodName + '\'' +
                ", parameterTypes=" + Arrays.toString(parameterTypes) +
                ", arguments=" + Arrays.toString(arguments) +
                ", attachments=" + attachments +
                ", beginTime=" + beginTime +
                ", endTime=" + endTime +
                ", count=" + count +
                '}';
    }
}
